/* ScriptVue - 主样式文件 */
/* 从原始style.css迁移的核心样式 */

/* Tailwind CSS 基础样式 - 必须导入 */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* 主题颜色变量 */
:root {
    --primary-color: #4F46E5;
    --secondary-color: #6366F1;
    --success-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --info-color: #3B82F6;
    --primary-hover: #4338CA;
    --primary-light: rgba(79, 70, 229, 0.1);
    --primary-lighter: rgba(79, 70, 229, 0.05);
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --border-color: #e5e7eb;
    --border-color-hover: #d1d5db;
    --border-color-active: #9fa6b2;
}

/* Element Plus 主题色覆盖 */
:root {
  --el-color-primary: #4F46E5;
  --el-color-primary-light-3: rgba(79, 70, 229, 0.7);
  --el-color-primary-light-5: rgba(79, 70, 229, 0.5);
  --el-color-primary-light-7: rgba(79, 70, 229, 0.3);
  --el-color-primary-light-8: rgba(79, 70, 229, 0.2);
  --el-color-primary-light-9: rgba(79, 70, 229, 0.1);
  --el-color-success: #10B981;
  --el-color-warning: #F59E0B;
  --el-color-danger: #EF4444;
  --el-color-info: #3B82F6;
}

/* 基础重置 */
body {
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* 步骤卡片样式 */
.script-step {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1.5px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    background: white;
}

.script-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.script-step:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.script-step:hover::before {
    height: 100%;
}

/* 步骤选中状态 */
.script-step.ring-2 {
    box-shadow: 0 0 0 2px var(--primary-color), 0 4px 8px rgba(79, 70, 229, 0.1);
}

/* 步骤编号样式增强 */
.script-step .step-number {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.script-step:hover .step-number {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 步骤操作按钮样式增强 */
.script-step .el-button {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.6;
}

.script-step:hover .el-button {
    opacity: 1;
}

.script-step .el-button:hover {
    transform: scale(1.15);
}

/* 步骤状态图标动画 */
.step-status-icon {
    transition: all 0.3s ease;
}

.step-status-icon.success {
    color: var(--success-color);
    animation: check-bounce 0.5s ease-out;
}

.step-status-icon.error {
    color: var(--danger-color);
    animation: error-shake 0.5s ease-out;
}

.step-status-icon.loading {
    animation: spin 1s linear infinite;
}

/* 按钮样式 */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* 圆角按钮样式 */
.rounded-button {
    border-radius: 8px !important;
}

/* 渐变按钮效果 */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform .5s, opacity 1s;
}

.ripple:active::after {
    transform: scale(0, 0);
    opacity: .3;
    transition: 0s;
}

/* 动画效果 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes check-bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

@keyframes error-shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    100% {
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
}

/* Element Plus 组件样式覆盖 */
.el-button.ripple {
    position: relative;
    overflow: hidden;
}

.el-button.ripple::after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform .5s, opacity 1s;
}

.el-button.ripple:active::after {
    transform: scale(0, 0);
    opacity: .3;
    transition: 0s;
}

/* 圆角按钮样式 */
.rounded-button {
    border-radius: 8px !important;
}

/* 运行步骤按钮特殊样式 */
.run-step-btn:hover {
    animation: pulse-green 0.6s ease-out;
}

/* 渐变背景效果 */
.bg-gradient-to-br {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* 页面加载状态指示器 */
.pulse-blue {
    animation: pulse-blue 2s ease-in-out infinite;
}

.pulse-yellow {
    animation: pulse-yellow 2s ease-in-out infinite;
}

@keyframes pulse-blue {
    0%, 100% {
        background-color: rgba(219, 234, 254, 1);
    }
    50% {
        background-color: rgba(191, 219, 254, 1);
    }
}

@keyframes pulse-yellow {
    0%, 100% {
        background-color: rgba(254, 243, 199, 1);
    }
    50% {
        background-color: rgba(253, 230, 138, 1);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .script-step {
        padding: 0.75rem;
    }
    
    .script-step button {
        padding: 0.25rem;
    }
}

/* Element Plus 样式增强 */
.el-button.rounded-button {
    border-radius: 8px !important;
}

/* 主色调工具类 */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* 固定宽度布局 */
.w-\[1440px\] {
    width: 1440px !important;
}

.w-\[400px\] {
    width: 400px !important;
}

/* 高度设置 */
.h-\[300px\] {
    height: 300px !important;
}
